package com.yuanfeng.order.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yuanfeng.commoms.util.ResponseResult;
import com.yuanfeng.order.entity.OrderReturnReasonEntity;
import com.yuanfeng.order.mapper.OrderReturnReasonMapper;
import com.yuanfeng.order.service.OrderReturnReasonService;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 *
 */
@Service
public class OrderReturnReasonServiceImpl extends ServiceImpl<OrderReturnReasonMapper, OrderReturnReasonEntity>
    implements OrderReturnReasonService{

    @Override
    public ResponseResult list(Integer orderReturnReasonType) {
        // 售后原因
        List<OrderReturnReasonEntity> returnReason = this.baseMapper.selectList(new LambdaQueryWrapper<OrderReturnReasonEntity>()
                .eq(OrderReturnReasonEntity::getOrderReturnReasonType, orderReturnReasonType));
        return ResponseResult.success(returnReason);
    }
}




